package com.ssy.lingxi.after.sale.api.model.constant;

import java.util.Arrays;

/**
 * 代客下单标识枚举
 * @author 彭冬冬
 * @date 2021/3/9
 * @version 2.0.0
 */
public enum AgentFlagEnum {
    
    NOT(0,"非代客"),
    YES(1,"代客");
    
    private final int code;
    private final String message;

    AgentFlagEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
    
    public String getMessage(int code) {
        return Arrays.stream(AgentFlagEnum.values()).findFirst().orElse(NOT).getMessage();
    }
}
